package routers

import (
	beego "github.com/beego/beego/v2/server/web"
	"novel_website_db/controllers"
)

func init() {
	beego.Router("/", &controllers.MainController{})
	//用户注册
	beego.Router("/user/add", &controllers.UserController{}, "post:Add")
	//用户登录
	beego.Router("/user/login", &controllers.UserController{}, "post:Login")
	//小说上传
	beego.Router("/novel/add", &controllers.NovelController{}, "post:Add")
	//阅读记录分页
	beego.Router("/record/page", &controllers.RecordController{}, "get:ListPage")
	//阅读列表
	beego.Router("/record/list", &controllers.RecordController{}, "get:List")
	//阅读记录删除
	beego.Router("/record/del", &controllers.RecordController{}, "post:Del")
}
